//
//  CPBaseTextField.h
//  CPBaseXCode
//
//  Created by cp on 2024/9/23.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger {
    TFDefault, //通用输入
    TFDecimalPad,//数字带点
    TFASCIICapable,//英文+数字输入
} CPTextFieldType;

@interface CPBaseTextField : UITextField
/**自定义placeholder颜色*/
@property (nonatomic,strong)UIColor *cPlaceholderTextColor;
/**字数限制*/
@property (nonatomic,assign)int textNumb;
- (void)textFieldDidChange:(UITextField *)textField;

- (void)setKeyBType:(CPTextFieldType)type;

- (CGRect)textRectForBounds:(CGRect)bounds;
- (CGRect)placeholderRectForBounds:(CGRect)bounds;
- (CGRect)editingRectForBounds:(CGRect)bounds;
//- (CGRect)clearButtonRectForBounds:(CGRect)bounds;
- (CGRect)leftViewRectForBounds:(CGRect)bounds;
//- (CGRect)rightViewRectForBounds:(CGRect)bounds;

@property (assign, nonatomic) CGFloat Imageleft;
@property (assign, nonatomic) CGFloat textleft;
@end


NS_ASSUME_NONNULL_END
